package cn.tedu.spring.exercise;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestProduct {
    @Test
    public void setTest() {
        ApplicationContext context = new ClassPathXmlApplicationContext
                ("bean-product.xml");
        Product product = context.getBean("product", Product.class);
        System.out.println(product);
    }

    @Test
    public void conTest() {
        ApplicationContext context = new ClassPathXmlApplicationContext
                ("bean-product.xml");
        Product product = context.getBean("product1", Product.class);
        System.out.println(product);
    }
}
